package com.nuonuo.refresh.service.impl;

import com.nuonuo.middleware.drs.spring.context.annotation.DrsBeanRefresh;
import com.nuonuo.refresh.service.TestSmartInitializingSingletonService;
import org.springframework.beans.factory.SmartInitializingSingleton;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.stereotype.Service;

/**
 * @author duan
 * @version 1.0
 * @date 2023/2/2 10:44
 */
@Service
@DrsBeanRefresh
//@Scope(proxyMode = ScopedProxyMode.TARGET_CLASS)
public class TestSmartInitializingSingletonServiceImpl implements TestSmartInitializingSingletonService, SmartInitializingSingleton {
    @Override
    public String sayHello() {
        return "(( hello, world ))";
    }

    @Override
    public void afterSingletonsInstantiated() {
        System.out.println("(((((((((((((((((  SmartInitializingSingleton )))))))))))))))))))");
    }
}
